<%@ include file="/WEB-INF/jsp/fragments/includes.jspf"%>
<%@ include file="/WEB-INF/jsp/fragments/header_top.jspf"%>

<title>Edit All Products Page</title>

<%@ include file="/WEB-INF/jsp/fragments/header_bottom.jspf"%>

<body>
	<h1>Edit All Products Page</h1>

	<%@ include file="/WEB-INF/jsp/fragments/navigation.jspf"%>

	<c:if test="${not empty products}">
		<table>
			<thead>
				<tr>
					<td>Id</td>
					<td>Name</td>
					<td>Units</td>
					<td>Weight</td>
					<td>Addition Date</td>
					<td>Edit</td>
				</tr>
			<thead>
			<tbody>
				<c:forEach var="product" items="${products}">
					<tr>
						<td>${product.id}</td>
						<td>${product.name}</td>
						<td>${product.units}</td>
						<td>${product.weight}</td>
						<td>${product.additionDate}</td>
						<td><a href="<c:url value='/product/edit/${product.id}'/>">Edit</a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</c:if>
</body>
</html>
